From: Florian Müllner Date: Sat, 11 Jul 2020 16:19:27 +0000 (+0200) Subject: workspacesView: Really don't animate primary view when fading X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~684^2^2~138 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ed4baec40faf84f06681d84205f87433c04e5117;p=gnome-shell.git workspacesView: Really don't animate primary view when fading In commit 9297d87775d64 we stopped syncing the primary view's actual geometry at the start of the transition when doing a fade animation, however the view animation may still be triggered by an allocation change. Prevent those unwanted size changes during fade by keeping track of the fade state and explicitly skip syncing the geometry while a fade is ongoing. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2969 --- diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index c74c6e9c7..c3ad4b6cf 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -383,8 +383,10 @@ class WorkspacesDisplay extends St.Widget { this._windowDragEndId = Main.overview.connect('window-drag-begin', this._windowDragEnd.bind(this)); - this._overviewShownId = Main.overview.connect('shown', - this._syncWorkspacesActualGeometry.bind(this)); + this._overviewShownId = Main.overview.connect('shown', () => { + this._inWindowFade = false; + this._syncWorkspacesActualGeometry(); + }); this._primaryIndex = Main.layoutManager.primaryIndex; this._workspacesViews = []; @@ -403,6 +405,7 @@ class WorkspacesDisplay extends St.Widget { this._actualGeometry = null; this._inWindowDrag = false; + this._inWindowFade = false; this._gestureActive = false; // touch(pad) gestures this._canScroll = true; // limiting scrolling speed @@ -560,6 +563,8 @@ class WorkspacesDisplay extends St.Widget { this._workspacesViews[i].animateToOverview(animationType); } + this._inWindowFade = fadeOnPrimary; + if (this._actualGeometry && !fadeOnPrimary) this._syncWorkspacesActualGeometry(); @@ -583,6 +588,8 @@ class WorkspacesDisplay extends St.Widget { this._workspacesViews[i].animateFromOverview(animationType); } + this._inWindowFade = fadeOnPrimary; + const { primaryIndex } = Main.layoutManager; const { x, y, width, height } = Main.layoutManager.getWorkAreaForMonitor(primaryIndex); @@ -707,7 +714,7 @@ class WorkspacesDisplay extends St.Widget { _syncWorkspacesActualGeometry() { const primaryView = this._getPrimaryView(); - if (!primaryView) + if (!primaryView || this._inWindowFade) return; primaryView.ease({